﻿using BankSystemWithCSharp.DataBase;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace BankSystemWithCSharp.UserPanel
{
    public partial class ATMDemoForm : Form
    {
        private Point StartPos;
        public ATMDemoForm(List<(string, string)> DemoAccount, Point startPos)
        {
            InitializeComponent();
            listView1.Items.Clear();
            foreach (var item in DemoAccount)
            {
                ListViewItem account = new ListViewItem(item.Item1);
                ListViewItem.ListViewSubItem password = new ListViewItem.ListViewSubItem(account, item.Item2);
                account.SubItems.Add(password);
                listView1.Items.Add(account);
            }

            StartPos = startPos;
        }

        private void ATMDemoForm_Load(object sender, EventArgs e)
        {
            this.Location = StartPos;
        }
    }
}
